package cn.cheneyjoo.service;

import cn.cheneyjoo.Model.OrderDetail;
import cn.cheneyjoo.Model.OrderMain;
import cn.cheneyjoo.mapper.OrderMainMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface OrderService {
    /**
     * 保存订单信息
     * @param orderMain
     * @return
     */
    boolean saveOrder(OrderMain orderMain);

    /**
     * 分页查询订单列表
     * @param pageIndex
     * @param pageSize
     * @param where
     * @return
     */
    List<OrderMain> getOrdersByPage(int pageIndex, int pageSize, Map<String,String> where);

    /**
     * 根据订单ID查询订单商品列表
     * @param orderId
     * @return
     */
    List<OrderDetail> getOrderDetailByOrderId(int orderId);
}
